﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using System.Net.Security;
using Harkon.AppServer.cOne.Service;

namespace Harkon.AppServer.cOne.Registry
{
    [ServiceContract]
    public interface IRegistry : ICoreService
    {
        void RegisterComponent(ComponentInformation component);

        bool IsComponentRegistered(ComponentInformation component);

        void UnregisterComponent(string componentName);

        [OperationContract]
        ComponentInformation[] GetRegisteredComponents();

        [OperationContract]
        ServiceName[] GetRegisteredServicesForComponent(ComponentInformation component);

        [OperationContract]
        ComponentInformation GetRegisteredComponentsForName(ServiceName serviceName);

        void RegisterService(ServiceName name, object target);

        ComponentInformation GetComponentForService(ServiceName service);

        ServiceName GetCorrectServiceName(ServiceName serviceName);

        object GetService(ServiceName service);

        string GetServiceUri(ServiceName service);

        #region Identification

        string GetRegistryUri();

        #endregion
    }
}
